<template>
  <div class='news-info'>
    <van-panel
      :title="newsInfo.zhaiyao"
      :status="`阅读${newsInfo.click}`"
    >
      <div class="content">{{newsInfo.content}}</div>
    </van-panel>
    <comment :id="id"></comment>
  </div>
</template>
<script>
import comment from '@/components/Comment'
// import Component from '../../../components/Componet'
export default {
  props: ['id'],
  data: () => ({
    newsInfo: {},
    msg: []
  }),
  created() {
    // console.log(this.id);
    this.getnewsinfo(this.id)

  },
  methods: {
    async getnewsinfo(id) {
      const res = await this.$http.getnewsinfo(id);
      // console.log(res);
      this.newsInfo = res.data.message;
    }
  },
  components: {
    comment
  }
}
</script>
<style lang="scss" scoped>
.news-info {
  padding: 0 10px;
  .van-cell__title {
    font-size: 14px;
    flex: 2;
    font-weight: 600;
  }
  .content {
    font-size: 14px;
    text-indent: 2em;
  }
}
</style>